<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>

<script src="${ctx}/includes/jquery.js" type="text/javascript"></script>
<script src="${ctx}/includes/jquery.validate.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/style/form_table.css">
<s:form id="edit_taskProcess_form" name="edit_taskProcess_form" method="post" action="taskProcess/update.do" enctype="multipart/form-data" onsubmit="return false;">
	<s:hidden id="taskid" name="taskid" />
	<s:hidden id="tpid" name="tpid" />
	<s:hidden id="creater" name="creater" />
	<div style="height:650px;overflow-x:hidden;overflow-y:auto;">
	<table class="form-table">
		<tr>
			<th width="150">主题：</th>
			<td>${title }</td>
		</tr>
		<tr>
			<th width="150">编号：</th>
			<td>${serial }</td>
		</tr>
		<tr>
			<th width="150">业联类别：</th>
			<td>${dataname }</td>
		</tr>
		<tr>
			<th width="150">创建时间：</th>
			<td>
			${creattimeString }
			</td>
		</tr>
		<tr>
			<th width="150">完成时间：</th>
			<td>
			${jhwcsjString }
			</td>
		</tr>
		<tr>
			<th width="150">内容：</th>
			<td>${content}</td>
		</tr>
		<tr>
			<th width="150">主送部门：</th>
			<td>
				<c:forEach items="${taskdepts}" var="item1" varStatus="status2">
				${item1.orgInfo} | 
				</c:forEach>
			</td>
		</tr>
		<tr>
			<th width="150">主送部门联系人：</th>
			<td>
			${zsbmlxr }
			</td>
		</tr>
		<tr>
			<th width="150">抄送部门：</th>
			<td>
				<c:forEach items="${taskSendDepts}" var="item2" varStatus="status2">
				${item2.orgInfo},
				</c:forEach>
			</td>
		</tr>
		<tr>
			<th width="150">审批状态：</th>
			<td>
				<c:if test="${taskstate == 0}">审批中</c:if>
				<c:if test="${taskstate == 1}">完成</c:if>
				<c:if test="${taskstate == 2}">退回</c:if>
			</td>
		</tr>
		<tr>
			<th width="150">执行状态：</th>
			<td>
				<c:if test="${execstate == -1}">未执行</c:if>
				<c:if test="${execstate == 0}">执行中</c:if>
				<c:if test="${execstate == 1}">完成</c:if>
				<c:if test="${execstate == 2}">终止</c:if>
			</td>
		</tr>
		<c:if test="${sessionScope.loginInfo.topdeptid == 9}">
		<c:if test="${execstate == 1}">
		<tr>
			<th width="150">查看详情：</th>
			<td>
				<a href="${ctx}/task_print.do?taskid=${taskid}" target="_blank">查看业务联系书</a>
			</td>
		</tr>
		</c:if>
		</c:if>
	</table>
	<table class="form-table">
		<tr>
			<th colspan="8" style="text-align: left;">办理意见</th>
		</tr>
		<tr>
			<th width="50" style="text-align: center;">序号</th>
			<th width="10%" style="text-align: center;">办理人编号</th>
			<th width="10%" style="text-align: center;">办理人</th>
			<th width="10%" style="text-align: center;">上一办理人</th>
			<%--<th width="10%" style="text-align: center;">操作类型</th> --%>
			<th width="10%" style="text-align: center;">办理类型</th>
			<th width="10%" style="text-align: center;">处理状态</th>
			<th width="20%" style="text-align: center;">办理时间</th>
			<th style="text-align: center;">办理结果</th>
		</tr>
		<c:forEach items="${taskProcessList}" var="item" varStatus="status">
		<tr>
			<td align="center">${status.index+1}</td>
			<td align="center">${item.hanlder }</td>
			<td align="center">${item.username }</td>
			<td align="center">${item.zprxm }</td>
			<%--<td align="center">
				<c:if test="${item.opttype == -1}">退回</c:if>
				<c:if test="${item.opttype == 1}">审批</c:if>
				<c:if test="${item.opttype == 2}">执行</c:if>
				<c:if test="${item.opttype == 3}">抄送</c:if>
			</td>--%>
			<td align="center">
				<c:if test="${item.hanldetype == 1}">办理</c:if>
				<c:if test="${item.hanldetype == 2}"><span style="color: blue;">抄送</span></c:if>
				<c:if test="${item.hanldetype == 3}">代办</c:if>
				<c:if test="${item.hanldetype == 4}">转下一审批</c:if>
				<c:if test="${item.hanldetype == 5}">审批完成</c:if>
				<c:if test="${item.hanldetype == 6}">审批退回</c:if>
			</td>
			
			<td align="center">
				<c:if test="${item.hanldestate == 0}">未处理</c:if>
				<c:if test="${item.hanldestate == 1}">完成</c:if>
			</td>
			
			<td align="center">${item.hanldtimeString}</td>
			<td align="left">${item.hanldresult}</td>
		</tr>
		</c:forEach>
	</table>
	<table class="form-table">
		<tr>
			<th colspan="5" style="text-align: left;">附件信息</th>
		</tr>
		<tr>
			<th width="50" style="text-align: center;">序号</th>
			<th style="text-align: center;">文件名称</th>
			<th style="text-align: center;">上传者</th>
			<th style="text-align: center;">大小</th>
			<th style="text-align: center;">上传时间</th>
		</tr>
		<c:forEach items="${attach}" var="item" varStatus="status">
		<tr>
			<td align="center">${status.index+1}</td>
			<td align="left"><a href="javascript:;" onclick="downloadFile('${item.attachid}');">${item.name }</a></td>
			<td align="center">${item.username }</td>
			<td align="center">${item.filesize}</td>
			<td align="center">${item.upTimeString}</td>
		</tr>
		</c:forEach>
	</table>
	</div>
</s:form>
<script type="text/javascript">
	function downloadFile(A){
		parent.window.location.href='${ctx}/filedownload.do?fileAsName='+A+'&timsStamp=' + new Date().getTime();
	}
</script>
